Revision: tla--devo--1.3.1--patch-2
Archive: lord@emf.net--2005
Creator: Thomas Lord <lord@emf.net>
Date: Fri Feb 11 16:34:24 PST 2005
Standard-date: 2005-02-12 00:34:24 GMT
Removed-files: libawk/trim.c libawk/trim.h
Modified-files: libarch/archive.c libarch/archive.h
    libarch/cmd-archive-mirror.c libarch/cmd-grab.c
    libarch/cmd-register-archive.c libarch/my.c
    libarch/patch-logs.c libarch/pfs-ftp.c
    libarch/pfs-signatures.c libfsutils/file-contents.c
    libfsutils/file-contents.h
New-patches: lord@emf.net--2005/tla--devo--1.3.1--patch-2
    lord@emf.net--libawk-exp-2005/tla--libawk-exp--1.3.1--patch-2
    lord@emf.net--libawk-exp-2005/tla--libawk-exp--1.3.1--patch-3
    lord@emf.net--libawk-exp-2005/tla--libawk-exp--1.3.1--patch-4
    lord@emf.net--libawk-exp-2005/tla--libawk-exp--1.3.1--patch-5
    lord@emf.net--libawk-exp-2005/tla--libawk-exp--1.3.1--patch-6
    lord@emf.net--libawk-exp-2005/tla--libawk-exp--1.3.1--patch-7
    lord@emf.net--libawk-exp-2005/tla--libawk-exp--1.3.1--patch-8
    lord@emf.net--libawk-exp-2005/tla--libawk-exp--1.3.1--patch-9
Summary: Remove "libawk/trim.[ch]"
Keywords: 


NOTE: this change must be used in combination with a version of
`libhackerlab' that includes the relatively new functions
`str_save_trimming' and `str_save_trimming_n'.  Those functions can be
found in `lord@emf.net--2005/hackerlab--devo--1.1--patch-2'.


libawk contained files "trim.[ch]" defining only the single
function `trim_surrounding_ws'.

That function was problematic for a technical and an aesthetic
reason:

/`trim_surrounding_ws' was not "safe for use in a library"./ It was
built-in to the API of this function that an allocation failure would
cause the function to not return.  It was built-in to the API that
it's argument had to be a string allocated using `lim_malloc' with
the `limits' parameter 0.

/`trim_surrounding_ws' had an unusual, and hence undesirable behavior
with respect to memory management./  `trim_surrounding_ws' passed its
argument to `lim_realloc' (with `limit' 0) and returned the result to
its caller.   That `realloc' idiom is sufficienly unusual as to be
worth avoiding if it is convenient.

All calls in `libarch' to `trim_surrounding_ws' have been eliminated.
The log messages merged from

  lord@emf.net--libawk-exp-2005/tla--libawk-exp--1.3.1

        patch-2 ... patch-9

give a more or less step by step description of the
correctness-preserving (one hopes :-) transformations that 
add up to being able to delete "trim.[ch]" from the source tree.

